--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit bdd3ce64e4a99af8ca3d7bebf0aad77cc4efd4a4
Parents : ea682bf
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Signature : T66BB85Valid, signed by author
Date : 2026-07-21T03:06:25+02:00
Added peer interface telemetry display to map
Changes
2 files changed, 37 insertions(+), 2 deletions(-)
Diff
diff --git a/sbapp/sideband/sense.py b/sbapp/sideband/sense.py
index dd71211f..330353e7 100644
--- a/sbapp/sideband/sense.py
+++ b/sbapp/sideband/sense.py
@@ -3229,8 +3229,13 @@ class Interfaces(Sensor):
data = { "interfaces": {} }
for if_name in packed:
- interface = {}
ifp = packed[if_name]
+ interface = { "name": if_name, "type": None, "reachable_on": None, "port": None,
+ "frequency": None, "bandwidth": None, "modulation": None,
+ "spreadingfactor": None, "codingrate": None, "channel": None,
+ "lat": None, "lon": None, "height": None, "transport": None, "transport_id": None,
+ "ifac_netname": None, "ifac_netkey": None }
+
if self._d.INTERFACE_TYPE in ifp: interface["type"] = ifp[self._d.INTERFACE_TYPE]
if self._d.TRANSPORT in ifp: interface["transport"] = ifp[self._d.TRANSPORT]
if self._d.TRANSPORT_ID in ifp: interface["transport_id"] = RNS.hexrep(ifp[self._d.TRANSPORT_ID], delimit=False)
diff --git a/sbapp/ui/map.py b/sbapp/ui/map.py
index e848e693..1ce30c53 100644
--- a/sbapp/ui/map.py
+++ b/sbapp/ui/map.py
@@ -673,7 +673,7 @@ class Map():
self.app.own_appearance_changed = False
changes = True
- if own_telemetry != None and "interfaces" in own_telemetry and own_telemetry["interfaces"] != None:
+ if own_telemetry != None and "interfaces" in own_telemetry and own_telemetry["interfaces"] != None:
own_interfaces = own_telemetry["interfaces"]["interfaces"]
for ifn in own_interfaces:
try:
@@ -769,6 +769,36 @@ class Map():
clustered_marker.update_props()
changes = True
+ if peer_interfaces != None and "interfaces" in peer_interfaces:
+ appearance = self.app.sideband.peer_appearance(telemetry_source)
+ tifs = peer_interfaces["interfaces"]
+ for ifn in tifs:
+ try:
+ ife = tifs[ifn]
+ ifts = telemetry["time"]["utc"]
+ discovery_hash = RNS.Identity.full_hash(telemetry_source+ifn.encode("utf-8"))
+ if_appearance = self.app.iface_appearance(ife["type"])
+ if_appearance[1] = appearance[1]
+ if_appearance[2] = appearance[2]
+ config_entry = None
+ iface = { "name": ifn, "type": ife["type"], "transport": ife["transport"], "transport_id": ife["transport_id"], "network_id": ife["transport_id"],
+ "received": ifts, "last_heard": ifts, "stamp": None, "value": None, "hops": None, "heard_count": None,
+ "reachable_on": ife["reachable_on"], "port": ife["port"], "status": "available", "status_code": 1000,
+ "latitude": ife["lat"], "longitude": ife["lon"], "height": ife["height"], "if_appearance": if_appearance,
+ "frequency": ife["frequency"], "bandwidth": ife["bandwidth"], "channel": ife["channel"], "config_entry": config_entry,
+ "modulation": ife["modulation"], "cr": ife["codingrate"], "sf": ife["spreadingfactor"] }
+ self.interface_discovery_hashes[discovery_hash] = iface
+ self.app.telemetry_interfaces[discovery_hash] = iface
+ if iface["latitude"] and iface["longitude"]:
+ if not discovery_hash in self.clustered_markers:
+ if_telemetry = {"location": {"latitude": iface["latitude"], "longitude": iface["longitude"], "last_update": time.time()}}
+ marker = self.create_clustered_marker(discovery_hash, if_telemetry, if_appearance)
+ if marker != None:
+ self.clustered_markers[discovery_hash] = marker
+ changes = True
+
+ except Exception as e: RNS.log("Error while updating peer interface markers: "+str(e), RNS.LOG_ERROR)
+
if self.app.sideband.config["map_connection_maps"]:
latest_connection_maps = None
for telemetry_entry in sorted(telemetry_entries[telemetry_source], key=lambda t: t[0], reverse=True):
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────